#include <iostream>
#include <algorithm>
using namespace std;
using LL = long long;
int n, m;
const int N = 200010;
int a[N];
int main()
{
    cin >> n >> m;
    for(int i = 0; i < n + m + 1; ++i)
        cin >> a[i];
    sort(a, a + n + m + 1, greater<int>());
    if(m == 0)
    {
        LL sum = 0;
        for(int i = 0; i < n + m + 1; ++i)
            sum += a[i];
        cout << sum << endl;
    }
    else
    {
        LL sum = 0;
        sum = a[0] - a[n + m];
        for(int i = 1; i < n + m; ++i)
            sum += abs(a[i]);
        cout << sum << endl;
    }
    return 0;
}